<?php
require_once('../../config.php');
Doctrine::loadModels('../../models');

if( $_GET["currency_id"] AND $_GET["date_start_id"])
{
	$currency_id = strip_tags($_GET["currency_id"]);
	$date_start_id = strip_tags($_GET["date_start"]);
	
	file_put_contents  ( "params_delete.txt", 
								"currency_id '" .$currency_id.
								"' date_start '" .$date_start_id."'");

	$q = Doctrine_Query::create();
	$q->update('FinExchangeRates')
          ->set('deleted', '1') 
          ->where('currency_id ='.$currency_id.'
          			AND date_start = '.$date_start_id);           
	$rows = $q->execute();          
	//print $rows; // the number of affected rows
}

?>